<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button id="btn" type="button">提交</button>
</body>
<script src="../static/js/jquery-1.10.2.min.js"></script>
<script>
    $().ready(function(){
        $("#btn").click(function(){
            $.post("/receives/",
                {
                    username:"admin",
                    pwd:"123",
                    csrfmiddlewaretoken:'{{csrf_token}}'
		        },
		        function(data,status){
                    alert("数据: \n" + data + "\n状态: " + status);
                    alert(data.msg)
		        }
		    );
        })
    })

</script>
</html>